﻿using System;
using System.Collections.Generic;
using System.Text;
using CGLib.Enums;

namespace CGLib
{
    /// <summary>
    /// Functions that the client calls. You should not use this when making your own game.
    /// </summary>
    public class CoreClient
    {
        public static void CallOnEvent(Enums.OnEventCallType callType, params object[] args)
        {
            switch (callType)
            {
                case OnEventCallType.MSNPacketReceived:

                    GameEvents.OnMSNPacketReceived((MSNPacket)args[0]);
                    break;

                case OnEventCallType.GamePhaseChanged:

                    GameEvents.OnGamePhaseChanged((Player)args[0], (GamePhase)args[1]);
                    break;

                case OnEventCallType.PlayerCardsReady:

                    GameEvents.OnPlayerCardsReady((Player)args[0]);
                    break;

                case OnEventCallType.TurnChanged:

                    GameEvents.OnTurnChanged((Player)args[0]);
                    break;

                case OnEventCallType.TurnEnded:

                    GameEvents.OnTurnEnded((Player)args[0], (bool)args[1]);
                    break;

                case OnEventCallType.GameReady:

                    GameEvents.OnGameReady();
                    break;

            }
        }
    }
}
